package com.design.flyweight.football;

/**
 * @author xiemiao
 * @description
 * @date 2023/08/16
 */
public class Player {

    private String name;

    private NationTitle title;

    private String number;

    public Player(String name, String country, String number) {
        this.name = name;
        this.title = NationTitleFactory.getTitle(country);
        this.number = number;
    }

    public void display() {
        System.out.println("队员：" + name + "，" + title.getName() + "，号码：" + number);
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public NationTitle getTitle() {
        return title;
    }

    public void setTitle(NationTitle title) {
        this.title = title;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }
}
